<?php

require_once APPLICATION_PATH.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'Component_Abstract.php';

class Tabs extends Component_Abstract  {
	
	private $_sections;
        private $_toggle;

        public function setToggle($data) {
            $this->_toggle=$data;
            return $this;
        }

        public function getToggle() {
            return $this->_toggle;
        }

        public function setSections($sections) {
		$this->_sections=$sections;
                return $this;
	}
	
	public function getSections() {
		return $this->_sections;
	}
	
	public function initComponent() {
                if (!is_null($this->getParameter('selected_doc_gid'))) {
                        $tb = new Default_Model_Documents();
                        $rows=$tb->findByGroupId($this->getParameter('selected_doc_gid'));
                        $this->setSections($rows);
                }
                $this->setToggle($this->getParameter('auto_toggle') == 1);

	}
	
	public function show() {
            $ret=$this->getTmplContent($this->getConfig()->phtml->mainpage);
            return $ret;
	}

        public function demo() {
            $ret=$this->getTmplContent($this->getConfig()->phtml->demopage);
            return $ret;
        }


        public function getConfigPage() {

            $ret=$this->getTmplContent($this->getConfig()->phtml->configpage);
            return $ret;

        }

        public function getOptionsDiv() {
            
            $ret=$this->getTmplContent($this->getConfig()->phtml->optionspage);
            return $ret;

        }


}
